package com.dyve.counting.preference;

import android.content.Context;
import android.preference.ListPreference;
import android.util.AttributeSet;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class CurrentDateTimeListPreference extends ListPreference
{
  public CurrentDateTimeListPreference(Context paramContext)
  {
    super(paramContext);
    a();
  }

  public CurrentDateTimeListPreference(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
    a();
  }

  private void a()
  {
    CharSequence[] arrayOfCharSequence1 = getEntryValues();
    CharSequence[] arrayOfCharSequence2 = getEntries();
    Date localDate = new Date();
    int i = 1;
    while (i < arrayOfCharSequence2.length)
    {
      arrayOfCharSequence2[i] = String.format((String)arrayOfCharSequence2[i], new Object[] { new SimpleDateFormat((String)arrayOfCharSequence1[i], Locale.getDefault()).format(localDate) });
      i += 1;
    }
    setEntries(arrayOfCharSequence2);
  }
}